package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type TmallServicecenterWorkcardRepairprogressUpdateRequest struct {
	/*
	   图片列表     */
	PicUrlList *[]string `json:"pic_url_list,omitempty" required:"false" `
	/*
	   请求节点的动作描述，唯一标识一个节点     */
	Action *string `json:"action" required:"true" `
	/*
	   工单id     */
	WorkcardId *int64 `json:"workcard_id" required:"true" `
	/*
	   衣服，鞋子     */
	ReceivedGoods *string `json:"received_goods,omitempty" required:"false" `
	/*
	   服务目标物瑕疵信息     */
	TargetGoodsDefects *string `json:"target_goods_defects,omitempty" required:"false" `
	/*
	   真实接单服务商账号Nick     */
	RealTpNick *string `json:"real_tp_nick,omitempty" required:"false" `
}

func (s *TmallServicecenterWorkcardRepairprogressUpdateRequest) SetPicUrlList(v []string) *TmallServicecenterWorkcardRepairprogressUpdateRequest {
	s.PicUrlList = &v
	return s
}
func (s *TmallServicecenterWorkcardRepairprogressUpdateRequest) SetAction(v string) *TmallServicecenterWorkcardRepairprogressUpdateRequest {
	s.Action = &v
	return s
}
func (s *TmallServicecenterWorkcardRepairprogressUpdateRequest) SetWorkcardId(v int64) *TmallServicecenterWorkcardRepairprogressUpdateRequest {
	s.WorkcardId = &v
	return s
}
func (s *TmallServicecenterWorkcardRepairprogressUpdateRequest) SetReceivedGoods(v string) *TmallServicecenterWorkcardRepairprogressUpdateRequest {
	s.ReceivedGoods = &v
	return s
}
func (s *TmallServicecenterWorkcardRepairprogressUpdateRequest) SetTargetGoodsDefects(v string) *TmallServicecenterWorkcardRepairprogressUpdateRequest {
	s.TargetGoodsDefects = &v
	return s
}
func (s *TmallServicecenterWorkcardRepairprogressUpdateRequest) SetRealTpNick(v string) *TmallServicecenterWorkcardRepairprogressUpdateRequest {
	s.RealTpNick = &v
	return s
}

func (req *TmallServicecenterWorkcardRepairprogressUpdateRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.PicUrlList != nil {
		paramMap["pic_url_list"] = util.ConvertBasicList(*req.PicUrlList)
	}
	if req.Action != nil {
		paramMap["action"] = *req.Action
	}
	if req.WorkcardId != nil {
		paramMap["workcard_id"] = *req.WorkcardId
	}
	if req.ReceivedGoods != nil {
		paramMap["received_goods"] = *req.ReceivedGoods
	}
	if req.TargetGoodsDefects != nil {
		paramMap["target_goods_defects"] = *req.TargetGoodsDefects
	}
	if req.RealTpNick != nil {
		paramMap["real_tp_nick"] = *req.RealTpNick
	}
	return paramMap
}

func (req *TmallServicecenterWorkcardRepairprogressUpdateRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
